3.14.50 \(\int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx\) [1350]

Optimal. Leaf size=81 \[ -\frac {b}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d)^2 (c+d x)}-\frac {2 b d \log (a+b x)}{(b c-a d)^3}+\frac {2 b d \log (c+d x)}{(b c-a d)^3} \]

[Out]

-b/(-a*d+b*c)^2/(b*x+a)-d/(-a*d+b*c)^2/(d*x+c)-2*b*d*ln(b*x+a)/(-a*d+b*c)^3+2*b*d*ln(d*x+c)/(-a*d+b*c)^3

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {46} \begin {gather*} -\frac {b}{(a+b x) (b c-a d)^2}-\frac {d}{(c+d x) (b c-a d)^2}-\frac {2 b d \log (a+b x)}{(b c-a d)^3}+\frac {2 b d \log (c+d x)}{(b c-a d)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + b*x)^2*(c + d*x)^2),x]

[Out]

-(b/((b*c - a*d)^2*(a + b*x))) - d/((b*c - a*d)^2*(c + d*x)) - (2*b*d*Log[a + b*x])/(b*c - a*d)^3 + (2*b*d*Log
[c + d*x])/(b*c - a*d)^3

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {1}{(a+b x)^2 (c+d x)^2} \, dx &=\int \left (\frac {b^2}{(b c-a d)^2 (a+b x)^2}-\frac {2 b^2 d}{(b c-a d)^3 (a+b x)}+\frac {d^2}{(b c-a d)^2 (c+d x)^2}+\frac {2 b d^2}{(b c-a d)^3 (c+d x)}\right ) \, dx\\ &=-\frac {b}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d)^2 (c+d x)}-\frac {2 b d \log (a+b x)}{(b c-a d)^3}+\frac {2 b d \log (c+d x)}{(b c-a d)^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 66, normalized size = 0.81 \begin {gather*} \frac {\frac {b (-b c+a d)}{a+b x}+\frac {d (-b c+a d)}{c+d x}-2 b d \log (a+b x)+2 b d \log (c+d x)}{(b c-a d)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + b*x)^2*(c + d*x)^2),x]

[Out]

((b*(-(b*c) + a*d))/(a + b*x) + (d*(-(b*c) + a*d))/(c + d*x) - 2*b*d*Log[a + b*x] + 2*b*d*Log[c + d*x])/(b*c -
 a*d)^3

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(248\) vs. \(2(81)=162\).
time = 6.85, size = 248, normalized size = 3.06 \begin {gather*} \frac {2 b d \left (a^3 c d^2-2 a^2 b c^2 d+a b^2 c^3+x \left (a^3 d^3-a^2 b c d^2-a b^2 c^2 d+b^3 c^3\right )+b d x^2 \left (a^2 d^2-2 a b c d+b^2 c^2\right )\right ) \left (\text {Log}\left [\frac {a+b x}{b}\right ]-\text {Log}\left [\frac {c+d x}{d}\right ]\right )+\left (-a d-b c-2 b d x\right ) \left (a d-b c\right )^3}{\left (a d-b c\right )^3 \left (a^3 c d^2-2 a^2 b c^2 d+a b^2 c^3+x \left (a^3 d^3-a^2 b c d^2-a b^2 c^2 d+b^3 c^3\right )+b d x^2 \left (a^2 d^2-2 a b c d+b^2 c^2\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[(a + b*x)^(-2)/(c + d*x)^2,x]')

[Out]

(2 b d (a ^ 3 c d ^ 2 - 2 a ^ 2 b c ^ 2 d + a b ^ 2 c ^ 3 + x (a ^ 3 d ^ 3 - a ^ 2 b c d ^ 2 - a b ^ 2 c ^ 2 d
 + b ^ 3 c ^ 3) + b d x ^ 2 (a ^ 2 d ^ 2 - 2 a b c d + b ^ 2 c ^ 2)) (Log[(a + b x) / b] - Log[(c + d x) / d])
 + (-a d - b c - 2 b d x) (a d - b c) ^ 3) / ((a d - b c) ^ 3 (a ^ 3 c d ^ 2 - 2 a ^ 2 b c ^ 2 d + a b ^ 2 c ^
 3 + x (a ^ 3 d ^ 3 - a ^ 2 b c d ^ 2 - a b ^ 2 c ^ 2 d + b ^ 3 c ^ 3) + b d x ^ 2 (a ^ 2 d ^ 2 - 2 a b c d +
b ^ 2 c ^ 2)))

________________________________________________________________________________________

Maple [A]
time = 0.16, size = 82, normalized size = 1.01

method result size
default \(-\frac {d}{\left (a d -b c \right )^{2} \left (d x +c \right )}-\frac {2 d b \ln \left (d x +c \right )}{\left (a d -b c \right )^{3}}-\frac {b}{\left (a d -b c \right )^{2} \left (b x +a \right )}+\frac {2 d b \ln \left (b x +a \right )}{\left (a d -b c \right )^{3}}\) \(82\)
risch \(\frac {-\frac {2 b d x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}-\frac {a d +b c}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}}{\left (b x +a \right ) \left (d x +c \right )}-\frac {2 b d \ln \left (d x +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}+\frac {2 b d \ln \left (-b x -a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) \(177\)
norman \(\frac {\frac {-a b \,d^{2}-b^{2} c d}{d b \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {2 b d x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}}{\left (b x +a \right ) \left (d x +c \right )}+\frac {2 b d \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}-\frac {2 b d \ln \left (d x +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) \(187\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*x+a)^2/(d*x+c)^2,x,method=_RETURNVERBOSE)

[Out]

-d/(a*d-b*c)^2/(d*x+c)-2*d/(a*d-b*c)^3*b*ln(d*x+c)-b/(a*d-b*c)^2/(b*x+a)+2*d/(a*d-b*c)^3*b*ln(b*x+a)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 208 vs. \(2 (81) = 162\).
time = 0.29, size = 208, normalized size = 2.57 \begin {gather*} -\frac {2 \, b d \log \left (b x + a\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} + \frac {2 \, b d \log \left (d x + c\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac {2 \, b d x + b c + a d}{a b^{2} c^{3} - 2 \, a^{2} b c^{2} d + a^{3} c d^{2} + {\left (b^{3} c^{2} d - 2 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} x^{2} + {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(d*x+c)^2,x, algorithm="maxima")

[Out]

-2*b*d*log(b*x + a)/(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3) + 2*b*d*log(d*x + c)/(b^3*c^3 - 3*a*b^
2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3) - (2*b*d*x + b*c + a*d)/(a*b^2*c^3 - 2*a^2*b*c^2*d + a^3*c*d^2 + (b^3*c^2*d
 - 2*a*b^2*c*d^2 + a^2*b*d^3)*x^2 + (b^3*c^3 - a*b^2*c^2*d - a^2*b*c*d^2 + a^3*d^3)*x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (81) = 162\).
time = 0.30, size = 241, normalized size = 2.98 \begin {gather*} -\frac {b^{2} c^{2} - a^{2} d^{2} + 2 \, {\left (b^{2} c d - a b d^{2}\right )} x + 2 \, {\left (b^{2} d^{2} x^{2} + a b c d + {\left (b^{2} c d + a b d^{2}\right )} x\right )} \log \left (b x + a\right ) - 2 \, {\left (b^{2} d^{2} x^{2} + a b c d + {\left (b^{2} c d + a b d^{2}\right )} x\right )} \log \left (d x + c\right )}{a b^{3} c^{4} - 3 \, a^{2} b^{2} c^{3} d + 3 \, a^{3} b c^{2} d^{2} - a^{4} c d^{3} + {\left (b^{4} c^{3} d - 3 \, a b^{3} c^{2} d^{2} + 3 \, a^{2} b^{2} c d^{3} - a^{3} b d^{4}\right )} x^{2} + {\left (b^{4} c^{4} - 2 \, a b^{3} c^{3} d + 2 \, a^{3} b c d^{3} - a^{4} d^{4}\right )} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(d*x+c)^2,x, algorithm="fricas")

[Out]

-(b^2*c^2 - a^2*d^2 + 2*(b^2*c*d - a*b*d^2)*x + 2*(b^2*d^2*x^2 + a*b*c*d + (b^2*c*d + a*b*d^2)*x)*log(b*x + a)
 - 2*(b^2*d^2*x^2 + a*b*c*d + (b^2*c*d + a*b*d^2)*x)*log(d*x + c))/(a*b^3*c^4 - 3*a^2*b^2*c^3*d + 3*a^3*b*c^2*
d^2 - a^4*c*d^3 + (b^4*c^3*d - 3*a*b^3*c^2*d^2 + 3*a^2*b^2*c*d^3 - a^3*b*d^4)*x^2 + (b^4*c^4 - 2*a*b^3*c^3*d +
 2*a^3*b*c*d^3 - a^4*d^4)*x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (70) = 140\).
time = 0.65, size = 406, normalized size = 5.01 \begin {gather*} - \frac {2 b d \log {\left (x + \frac {- \frac {2 a^{4} b d^{5}}{\left (a d - b c\right )^{3}} + \frac {8 a^{3} b^{2} c d^{4}}{\left (a d - b c\right )^{3}} - \frac {12 a^{2} b^{3} c^{2} d^{3}}{\left (a d - b c\right )^{3}} + \frac {8 a b^{4} c^{3} d^{2}}{\left (a d - b c\right )^{3}} + 2 a b d^{2} - \frac {2 b^{5} c^{4} d}{\left (a d - b c\right )^{3}} + 2 b^{2} c d}{4 b^{2} d^{2}} \right )}}{\left (a d - b c\right )^{3}} + \frac {2 b d \log {\left (x + \frac {\frac {2 a^{4} b d^{5}}{\left (a d - b c\right )^{3}} - \frac {8 a^{3} b^{2} c d^{4}}{\left (a d - b c\right )^{3}} + \frac {12 a^{2} b^{3} c^{2} d^{3}}{\left (a d - b c\right )^{3}} - \frac {8 a b^{4} c^{3} d^{2}}{\left (a d - b c\right )^{3}} + 2 a b d^{2} + \frac {2 b^{5} c^{4} d}{\left (a d - b c\right )^{3}} + 2 b^{2} c d}{4 b^{2} d^{2}} \right )}}{\left (a d - b c\right )^{3}} + \frac {- a d - b c - 2 b d x}{a^{3} c d^{2} - 2 a^{2} b c^{2} d + a b^{2} c^{3} + x^{2} \left (a^{2} b d^{3} - 2 a b^{2} c d^{2} + b^{3} c^{2} d\right ) + x \left (a^{3} d^{3} - a^{2} b c d^{2} - a b^{2} c^{2} d + b^{3} c^{3}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)**2/(d*x+c)**2,x)

[Out]

-2*b*d*log(x + (-2*a**4*b*d**5/(a*d - b*c)**3 + 8*a**3*b**2*c*d**4/(a*d - b*c)**3 - 12*a**2*b**3*c**2*d**3/(a*
d - b*c)**3 + 8*a*b**4*c**3*d**2/(a*d - b*c)**3 + 2*a*b*d**2 - 2*b**5*c**4*d/(a*d - b*c)**3 + 2*b**2*c*d)/(4*b
**2*d**2))/(a*d - b*c)**3 + 2*b*d*log(x + (2*a**4*b*d**5/(a*d - b*c)**3 - 8*a**3*b**2*c*d**4/(a*d - b*c)**3 +
12*a**2*b**3*c**2*d**3/(a*d - b*c)**3 - 8*a*b**4*c**3*d**2/(a*d - b*c)**3 + 2*a*b*d**2 + 2*b**5*c**4*d/(a*d -
b*c)**3 + 2*b**2*c*d)/(4*b**2*d**2))/(a*d - b*c)**3 + (-a*d - b*c - 2*b*d*x)/(a**3*c*d**2 - 2*a**2*b*c**2*d +
a*b**2*c**3 + x**2*(a**2*b*d**3 - 2*a*b**2*c*d**2 + b**3*c**2*d) + x*(a**3*d**3 - a**2*b*c*d**2 - a*b**2*c**2*
d + b**3*c**3))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 166 vs. \(2 (81) = 162\).
time = 0.00, size = 165, normalized size = 2.04 \begin {gather*} \frac {2 b d^{2} \ln \left |x d+c\right |}{b^{3} d c^{3}-3 b^{2} a d^{2} c^{2}+3 b a^{2} d^{3} c-a^{3} d^{4}}+\frac {2 b^{2} d \ln \left |x b+a\right |}{-b^{4} c^{3}+3 b^{3} a d c^{2}-3 b^{2} a^{2} d^{2} c+b a^{3} d^{3}}+\frac {2 x b d+b c+a d}{\left (-b^{2} c^{2}+2 b a d c-a^{2} d^{2}\right ) \left (x^{2} b d+x b c+x a d+a c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(d*x+c)^2,x)

[Out]

-2*b^2*d*log(abs(b*x + a))/(b^4*c^3 - 3*a*b^3*c^2*d + 3*a^2*b^2*c*d^2 - a^3*b*d^3) + 2*b*d^2*log(abs(d*x + c))
/(b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^3 - a^3*d^4) - (2*b*d*x + b*c + a*d)/((b^2*c^2 - 2*a*b*c*d + a^2*d
^2)*(b*d*x^2 + b*c*x + a*d*x + a*c))

________________________________________________________________________________________

Mupad [B]
time = 0.33, size = 74, normalized size = 0.91 \begin {gather*} \frac {1}{\left (a\,d-b\,c\right )\,\left (a+b\,x\right )\,\left (c+d\,x\right )}-\frac {2\,d}{{\left (a\,d-b\,c\right )}^2\,\left (c+d\,x\right )}-\frac {2\,b\,d\,\ln \left (\frac {c+d\,x}{a+b\,x}\right )}{{\left (a\,d-b\,c\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + b*x)^2*(c + d*x)^2),x)

[Out]

1/((a*d - b*c)*(a + b*x)*(c + d*x)) - (2*d)/((a*d - b*c)^2*(c + d*x)) - (2*b*d*log((c + d*x)/(a + b*x)))/(a*d
- b*c)^3

________________________________________________________________________________________